package com.snail.snailvr.model;

import android.support.annotation.DrawableRes;
import android.view.View;

import com.activeandroid.Model;
import com.activeandroid.annotation.Column;
import com.activeandroid.annotation.Table;

/**
 * Input界面每个item的model类
 * Created by snail on 16/4/22.
 */
@Table(name = "disk")
public class InputItem extends Model {
    private int inputType = -1;

    private int iconResId;

    @Column(name = "account_name")
    private String title;

    @Column(name = "disk_type", unique = true, onUniqueConflict = Column.ConflictAction.REPLACE)
    private String subTitle;

    @Column(name = "connected",onUniqueConflict = Column.ConflictAction.REPLACE)
    private boolean connected;

    private String dividerTitle;//每个大栏目的分割文字

    private View.OnClickListener mOnClickListener;

    public InputItem() {
    }

    public InputItem(String title, int inputType, View.OnClickListener listener) {
        this.title = title;
        this.inputType = inputType;
        mOnClickListener = listener;
    }

    public InputItem(@DrawableRes int resId, String title, String subTitle, int inputType, View.OnClickListener listener) {
        this.iconResId = resId;
        this.title = title;
        this.subTitle = subTitle;
        this.inputType = inputType;
        mOnClickListener = listener;
    }

    public InputItem(String title, String subTitle)
    {
        this.title = title;
        this.subTitle = subTitle;
    }

    public void setIconResId(int iconResId) {
        this.iconResId = iconResId;
    }

    public int getIconResId() {
        return iconResId;
    }

    public String getTitle() {
        return title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public String getDividerTitle() {
        return dividerTitle;
    }

    public void setInputType(int inputType) {
        this.inputType = inputType;
    }

    public int getInputType() {
        return inputType;
    }

    public void setmOnClickListener(View.OnClickListener mOnClickListener) {
        this.mOnClickListener = mOnClickListener;
    }

    public View.OnClickListener getOnClickListener() {
        return mOnClickListener;
    }

    public void setConnected(boolean connected) {
        this.connected = connected;
    }

    public boolean isConnected() {
        return connected;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
